import axios from '../../axios';
const usersApi = {
  isOnelogin() {
    return axios({
      url: '/users/isAdminSalesLogin',
      method: 'post',
    });
  },
  login(data) {
    return axios({
      url: 'users/userLogin',
      method: 'post',
      data,
    });
  },
  getAllUsers(data) {
    return axios({
      url: '/users/getAllUsers',
      method: 'post',
      data,
    });
  },
  deleteOneUser(_id) {
    return axios({
      url: '/users/deleteOneUser',
      method: 'post',
      data: { _id },
    });
  },
  myUsersList(data) {
    return axios({
      url: '/users/myUsersList',
      method: 'post',
      data,
    });
  },
  addUser(data) {
    return axios({
      url: '/users/addUser',
      method: 'post',
      data,
    });
  },
  getOneUser(_id) {
    return axios({
      url: '/users/getOneUser',
      method: 'post',
      data: { _id },
    });
  },
  updateOneUser(data) {
    return axios({
      url: '/users/updateOneUser',
      method: 'post',
      data,
    });
  },
};
export default usersApi;
